-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate menhir parser and elaborator tests #1220
Conversation
…sues with the output from the menhir -> DHExp
…es & changed tests to reflect this
…ng to better handle parens + added free var application elaboration test with menhir
… added ids to the pats
…ory, added in the plus to the fix point function name
test/Test_ExpToSegment.re
Outdated
string, | ||
"Match statement", | ||
serialized, | ||
"case x end" // TODO Why is this not serializing the cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix and mark this as a skipped test until we fix the issue (file the issue)
* serialize it, parse it with Menhir, and compare to the original. | ||
* | ||
* TODO This fails due to types not being serialized on constructors | ||
* and some other ExpToSegment inconsistencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file bugs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cyrus- these are the bugs I've found with the qcheck test.
( | ||
settings.inline | ||
? [] : [Secondary(Secondary.mk_newline(Id.mk()))] | ||
) | ||
@ [mk_form("rule", id, [p])] | ||
@ (e |> fold_if(settings.fold_case_clauses)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also solved in #1450
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging either PR first is fine.
This PR introduces a Menhir-based parser for Hazel's textual syntax, designed to support the elaborator's unit testing. The textual representation is supposed to support pre and post elaboration, so special syntax is used for post-elaboration forms. Key components include: